package br.com.appestoque.util;

import net.swisstech.bitly.BitlyClient;
import net.swisstech.bitly.model.Response;
import net.swisstech.bitly.model.v3.ShortenResponse;

public class Miscelanea {
	public static String encurtarURL(String url) throws Exception {
		BitlyClient client = new BitlyClient(Constantes.TOKEN_BITLY);
		Response<ShortenResponse> respShort = client.shorten().setLongUrl(url).call();
		return respShort.data.url;
	}
}
